<template>
  <div>
      我是新闻详情
      <h1>{{dataarr}}</h1>
  </div>
</template>

<script>
import {homelink} from "@/api/homeapi.js"
export default {
    data(){
        return {
            dataarr:[]
        }
    },
    created(){
        console.log(`详情页面${this.$route.params.id}`)


         homelink("http://api.artgoer.cn:8084/artgoer/api/v1/user/324380/v3/topic/topicHomeByLabel?pageIndex=1&token=b544cd63-6d42-46fe-a96c-3cf96bae3113&topicId=62187","get").then((ok)=>{
            let newarr=ok.data.data.commentList

            this.dataarr=newarr.filter((v)=>{
                if(v.id==this.$route.params.id){
                    return v
                }
            })

        console.log(this.dataarr)

        }).catch((err)=>{
            console.log(err)
        })
    }
}
</script>

<style>

</style>